package com.czx.common.utils;

import org.mindrot.jbcrypt.BCrypt;

/**
 * 密码加密的工具类
 */
public class PasswordUtils {

    public static String hashpw(String pw){
        return BCrypt.hashpw(pw,BCrypt.gensalt());
    }

    public static boolean checkpw(String pw,String dbPw){
        return BCrypt.checkpw(pw,dbPw);
    }
}
